<template>
  <Toast group="upload_success" />
  <Toast group="upload_failed" />
  <RouterView class="dark:text-white" />
</template>

<script setup>
import Toast from 'primevue/toast';
import { useToast } from 'primevue/usetoast';
import { useToastStore } from './stores';
const toastStore = useToastStore();
const toast = useToast();

watch(
  () => toastStore.trigger,
  () => {
    toast.add(toastStore.config);
  }
);
watch(
  () => toastStore.closeTrigger,
  () => {
    toast.removeGroup(toastStore.closeGroup);
  }
);
</script>

<style>
/* #endif */
</style>
